Show the current attributes/settings of the target in the inspector.
NOTE: When setting the contents of a TextField, it is important to set it's text delegate to nil before setting, that reset its TextDelegate to self afterwards. This prevents -textDidChange: messages from being sent when we are setting the contents of the field.
*/
{
DrawInfo drawInfo;
char s[2] = " ";
[[swapView window] disableFlushWindow];
[nameField setTextDelegate:nil];
[nameField setStringValue:[target groupName]];
[nameField setTextDelegate:self];
if ( [target keyEquivalent] ) s[0] = [target keyEquivalent];
Called by pathField when editing in the field finishes
*/
{
if ( ![target setDefaultPath:[pathField stringValue]] ) {
[pathField selectText:self];
return ( self );
}
return ( self );
}
- chooseGroupPath:sender
/*
This method is the action of the choosePathButton. Pops up an OpenPanel to choose the group's default path. The OpenPanel forces them to choose a directory by setting the required type to something that (most likely) will not ever be a valid file type.
Make sure changes made in field get saved. If the field was exited with a return, then it will automatically send the action (which is where it gets saved). If the field was exited with a tab, we need to send the action ourselves.
*/
{
if ( [sender isKindOf:[Text class]] ) sender = [sender delegate];